﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesGLApp.DAL.MesDB
{
    [Serializable]
    [Table("source_pp_cycle")]
    public class SourcePPCycle
    {
        /// <summary>
        /// ID，自增长
        /// </summary>
        [Column("id"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 源工单ID
        /// </summary>
        [Column("source_id")]
        public int SourceID { get; set; }

        /// <summary>
        /// 源工单号
        /// </summary>
        [Column("prod_number")]
        public string ProdNumber { get; set; }

        /// <summary>
        /// 生产订单日期
        /// </summary>
        [Column("order_date")]
        public DateTime OrderDate { get; set; }

        /// <summary>
        /// 源工单产品数量
        /// </summary>
        [Column("order_qty")]
        public decimal OrderQty { get; set; }

        /// <summary>
        /// 产品类型，分为防水与不防水，而防水又分为外发加工与内部加工
        /// </summary>
        [Column("prod_type")]
        public string ProdType { get; set; }

        /// <summary>
        /// 是否齐料
        /// </summary>
        [Column("is_complete")]
        public int IsComplete { get; set; }

        /// <summary>
        /// 预计齐料日期
        /// </summary>
        [Column("mat_wait_date")]
        public DateTime? MatWaitDate { get; set; }

        /// <summary>
        /// 预计SMT完成日期
        /// </summary>
        [Column("smt_date")]
        public DateTime? SmtDate { get; set; }

        /// <summary>
        /// 预计焊接完成日期
        /// </summary>
        [Column("weld_date")]
        public DateTime? WeldDate { get; set; }

        /// <summary>
        /// 预计测试完成日期
        /// </summary>
        [Column("test_date")]
        public DateTime? TestDate { get; set; }

        /// <summary>
        /// 预计包装完成日期
        /// </summary>
        [Column("pack_date")]
        public DateTime? PackDate { get; set; }

        /// <summary>
        /// 预计异常时间
        /// </summary>
        [Column("err_days")]
        public decimal? ErrDays { get; set; }


        /// <summary>
        /// 预计生产完成日期
        /// </summary>
        [Column("end_date")]
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 修改后的计划完成日
        /// </summary>
        [Column("plan_date")]
        public DateTime? PlanDate { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime CreateDate { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }
    }
}
